package cn.ming.wfchat.kit;

import android.app.Application;

import cn.ming.wfchat.kit.group.GroupAnnouncement;
import cn.ming.wfchat.kit.net.SimpleCallback;
import cn.ming.wfchat.kit.net.base.StatusResult;


public interface AppServiceProvider {
    public interface UpdateGroupAnnouncementCallback {
        void onUiSuccess(GroupAnnouncement announcement);

        void onUiFailure(int code, String msg);
    }

    public interface GetGroupAnnouncementCallback {
        void onUiSuccess(GroupAnnouncement announcement);

        void onUiFailure(int code, String msg);
    }

    public void getGroupAnnouncement(String groupId, GetGroupAnnouncementCallback callback);

    public void updateGroupAnnouncement(String groupId, String announcement, UpdateGroupAnnouncementCallback callback);

    /**
     * 前置条件是已经调过{@link cn.wildfirechat.remote.ChatManager#init(Application, String)}
     *
     * @param callback
     */
    void uploadLog(SimpleCallback<String> callback);


    /**
     * 双向撤回
     *
     * @param toUser   发给谁的userId
     * @param callback
     */
    void sendAllReCallMessage(String toUser, String type, SimpleCallback<StatusResult> callback);

    /**
     * 删除好友相关
     *
     * @param friendsUserId
     * @param callback
     */
    void deleteFriendsRelevant(String friendsUserId, SimpleCallback<StatusResult> callback);
}
